<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
<title>商品入库信息</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link href="${ctx }/CSS/style.css" rel="stylesheet" type="text/css">
<body>
<table width="584" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="27" colspan="6" bgcolor="#EEEEEE" class="tableBorder_gray">
    &nbsp;<span  class="word_deepgrey"> 当前位置：库存管理> </span>商品入库 &gt;&gt;&gt;</td>
  </tr>
    <tr><td valign="top" height="83">
    	<form action="${ctx }/goodsAction.do" method="post">
    	<input type="hidden" name="method" value="newGoods">
	    <table width="98%" height="112"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#F2F2F2">
	    	<c:if test="${not empty message }">
	    	<tr>
	    		<td width="274" colspan="2">${message }</td>
	    	</tr>
	    	</c:if>
	    	<tr>
	    		<td width="137">商品名</td>
	    		<td width="137"><input type="text" name="name" /></td>
	    	</tr>
	    	<tr>
	    		<td width="137">分类</td>
	    		<td width="137">
	    			<select name="categoryId">
	    				<option value="0" selected>不设分类</option>
	    				<c:forEach var="category" items="${categorys }">
	    					<option value="${category.categoryId }">${category.name }</option>
	    				</c:forEach>
		            </select>
	    		</td>
	    	</tr>
	    	<tr>
	    		<td><input type="submit" value="保存" /></td>
	    		<td><input type="reset" value="重置" /></td>
	    	</tr>
		</table>
		</form>
	</td></tr>
</table>
</body>
</html>
<script language='JavaScript'>
function spchange()
{
  form1.submit();
}
function autoje()
{
    str=form2.sl.value;
    if(isNaN(str)){//判断输入是否为数字
      form2.sl.value=0;
      alert("输入错误,请输入数字");form2.sl.focus();retrun;}
    str=form2.dj.value;
    if(isNaN(str)){
      form2.dj.value=0;
      alert("输入错误,请输入数字");form2.dj.focus();retrun;}
    str=form2.sf.value;
    if(isNaN(str)){
      form2.sf.value=0;
      alert("输入错误,请输入数字");form2.sf.focus();retrun;}
    //自动计算金额、应收及未收款
    form2.je.value=form2.dj.value*form2.sl.value;
    form2.yf.value=form2.je.value;
    form2.wf.value=form2.yf.value-form2.sf.value;
    if(form2.sf.value-form2.yf.value>0){
      form2.sf.value=0;
      form2.wf.value=form2.yf.value;
      alert("实付金额不应大于应付金额!");form2.sf.focus();return;
    }
}
function check()
{
  if(form2.sl.value==0){
    alert("请输入数量");form2.sl.focus();return;}
  if(form2.dj.value==0){
    alert("请输入单价");form2.dj.focus();return;}
  if(form2.sf.value==0){
    alert("请输入实付");form2.sf.focus();return;}
  if(form2.jsr.value==""){
    alert("请输入经手人姓名");form2.jsr.focus();return;}
  form2.submit();
}
function myreset()
{
  form2.reset();
}
</script>




















